function A = fp(X, W)
% 前向传播
% input:
%     X - matrix cell array
%     W - matrix cell array
% output:
%     A - matrix cell array
    m = size(X, 1);
    A{1} = [ones(m, 1), X];
    for k = 1: length(W) - 1
        A{k + 1} = [ones(m, 1), sigmoid(A{k} * (W{k})')];
    end
    A{k + 2} = sigmoid(A{k + 1} * (W{k + 1})');
end